<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 							  xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
            doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>    
	<xsl:template match="/">
	    <link rel="stylesheet" type="text/css" href="css/stylesheet_2.css"/>
	    <b><i>Here's your timetable...</i></b><br/><br/>
	    <table class='gridtable'>
		    <thead>
		    	<th>Course/Group</th>
		    	<th>Sessions...</th>
		    </thead>
		    <tbody>
				<xsl:for-each select="//course">
					<tr>
						<td>
							Course: <b><xsl:value-of select="@course_name"/></b><br/>
							Group: <b><xsl:value-of select="@course_group"/></b><br/>
						</td>
						<xsl:for-each select="./session">
							<td>
								<xsl:choose>
									<xsl:when test="@day = 1">
									<b>Sunday</b>
									</xsl:when>
									<xsl:when test="@day = 2">
									<b>Monday</b>
									</xsl:when>
									<xsl:when test="@day = 3">
									<b>Tuesday</b>
									</xsl:when>
									<xsl:when test="@day = 4">
									<b>Wednesday</b>
									</xsl:when>
									<xsl:when test="@day = 5">
									<b>Thursday</b>
									</xsl:when>
									<xsl:when test="@day = 6">
									<b>Friday</b>
									</xsl:when>
									<xsl:when test="@day = 7">
									<b>Saturday</b>
									</xsl:when>
								</xsl:choose><br/>
								<xsl:value-of select="concat(@start,':00')"/>-<xsl:value-of select="concat(@end,':00')"/><br/>
							</td>
						</xsl:for-each>
					</tr>
				</xsl:for-each>
			</tbody>
		</table>
	</xsl:template>
</xsl:stylesheet>